#include <io_utils.h>
#include <string.h>
#include <stdlib.h>

int main() {
  char *mem = malloc(10);
  memset(mem, 0, 10);

  PRINT_INT_ARRAY(mem, 10);
  free(mem);

  char *left = "Hello World!";
  char *right = "Hello C Programmers!";

  PRINT_INT(strcmp(left, right));
  PRINT_INT(strncmp(left, right, 5));

  char src[] = "HelloWorld";
  char *dest = malloc(11);
  memset(dest, 0, 11);
  memcpy(dest, src, 11);
  puts(dest);
  memcpy(dest + 3, dest + 1, 4);
  puts(dest);
  free(dest);

  int * restrict restar = malloc(sizeof(int)*10);
  int ar[10]={0};
  int *p = restar;
  memset(restar, 0, sizeof(int)*10);
  for(int i=0;i<10;i++){
    restar[i]+=5;
    restar[i]+=3;
    ar[i]+=5;
    ar[i]+=3;
  }
  for(int i=0;i<10;i++){
    printf("restar[%d]=%d\n",i,restar[i]);
    printf("ar[%d]=%d\n",i,ar[i]);
  }
  free(restar);
  return 0;
}
